package com.rd.student.jike.class4.xiayinyin.day0731;

import java.util.ArrayList;

public class Exercises03 {
    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>(20);
        for (int i = 0; i < 20; i++) {
            int random = (int)(Math.random()*50);
            if (list.contains(random)){
                i--;
                continue;
            }
            list.add(random);
        }
        System.out.println(list);
    }
}
